home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Adobe Graphics & Publishing SDK 1996 December
/
Adobe Graphics & Publishing SDK 1996 December.iso
/
mac
/
Illustrator 6.0 SDK r1 Mac
/
AI Plugin Interface
/
AIRaster.h
< prev
next >
Wrap
Text File
|
1995-12-21
|
4KB
|
183 lines
/**
AIRaster.h
Copyright (c) 1995 Adobe Systems Incorporated.
All Rights Reserved
Adobe Illustrator 6.0 Raster Object Suite.
**/
#ifndef __AIRaster__
#define __AIRaster__
/*******************************************************************************
**
** Imports
**
**/
#include "AITypes.h"
#include "AIArt.h"
#include "AIFixedMath.h"
#if Macintosh
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import on
#endif
#endif
/*******************************************************************************
**
** Constants
**
**/
#define kAIRasterSuite "AI Raster Suite"
#define kAIRasterVersion 2
#define kRasterMaskImageType 0x0002
#define kRasterInvertBits 0x0004 // invert 1-bit image or mask
#define kMaxChannels 16
#define kGrayColorSpace 0
#define kRGBColorSpace 1
#define kCMYKColorSpace 2
// error codes
#define kRasterTypeNotSupportedErr 'RTYP'
#define kRasterSpecifiedErr 'RSPE' // raster has already been specified
#define kRasterBitsPerPixelsNotSupportedErr 'RBIT' // raster bits per pixel not supported
/*******************************************************************************
**
** Types
**
**/
typedef signed char int8;
typedef unsigned char uint8;
typedef signed short int16;
typedef unsigned short uint16;
typedef signed long int32;
typedef unsigned long uint32;
typedef struct {
long top, left, bottom, right, front, back;
} Slice;
typedef struct {
void *data;
Slice bounds;
long rowBytes;
long colBytes;
long planeBytes;
short channelInterleave[kMaxChannels];
} Tile;
/*
*
* The two different kinds of color tables supported (rgb and cmyk).
*
*/
typedef struct _t_AIRGBColorRec {
uint8 mustBeZero; /* MUST BE ZERO!!!! */
uint8 red;
uint8 green;
uint8 blue;
} AIRGBColorRec;
typedef struct _t_AIExtendedRGBColorRec {
uint16 mustBeZero; /* MUST BE ZERO!!!! */
uint16 red;
uint16 green;
uint16 blue;
} AIExtendedRGBColorRec;
typedef struct _t_AICMYKColorRec {
uint8 cyan;
uint8 magenta;
uint8 yellow;
uint8 black;
} AICMYKColorRec;
typedef struct _t_AIRasterRecord {
uint16 flags;
Rect bounds;
int32 byteWidth;
int16 colorSpace;
int16 bitsPerPixel;
} AIRasterRecord;
#if Macintosh
typedef FSSpec PlatformRasterFileSpecification;
#endif
/*******************************************************************************
**
** Suite
**
**/
typedef struct {
MACPASCAL FXErr (*GetRasterInfo) ( AIArtHandle raster, AIRasterRecord *info );
MACPASCAL FXErr (*SetRasterInfo) ( AIArtHandle raster, AIRasterRecord *info );
MACPASCAL FXErr (*GetRasterFileSpecification) ( AIArtHandle raster,
PlatformRasterFileSpecification *file );
MACPASCAL FXErr (*SetRasterFileSpecification) ( AIArtHandle raster,
PlatformRasterFileSpecification *file );
MACPASCAL FXErr (*GetRasterMatrix) ( AIArtHandle raster, FixedMatrix *matrix );
MACPASCAL FXErr (*SetRasterMatrix) ( AIArtHandle raster, FixedMatrix *matrix );
MACPASCAL FXErr (*GetRasterBoundingBox) ( AIArtHandle raster, FixedRect *bbox );
MACPASCAL FXErr (*SetRasterBoundingBox) ( AIArtHandle raster, FixedRect *bbox );
MACPASCAL FXErr (*GetRasterTile) ( AIArtHandle raster, Slice *artSlice, Tile *workTile, Slice *workSlice );
MACPASCAL FXErr (*SetRasterTile) ( AIArtHandle raster, Slice *artSlice, Tile *workTile, Slice *workSlice );
} AIRasterSuite;
#if Macintosh
#if PRAGMA_IMPORT_SUPPORTED
#pragma import off
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
#ifdef __cplusplus
}
#endif
#endif
#endif